package com.yoyoyo666.report.common;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public class ReportPage<T> extends Page<T> {

    public long start;

    public ReportPage(long start) {
        this.start = start;
    }

    public ReportPage(long current, long size) {
        super(current, size);
    }

    public ReportPage(long current, long size, Long total) {
        super(current, size, total);
    }

    public long getStart() {
        return (this.getCurrent()-1) * this.getSize();
    }

    public  EasyUIPageResult<T> getEuiPage(){

        EasyUIPageResult<T> rdto = new EasyUIPageResult<>();
        rdto.setTotal(this.getTotal());
        rdto.setRows(this.getRecords());
        return rdto;
    }

}
